package com.tyqx.hashchainbackend.service;


import com.tyqx.hashchainbean.module.SysResource;
import com.tyqx.hashchainbean.vo.PerOrResourceResultVO;
import com.tyqx.hashchainbean.vo.SysResourceVO;
import hashchainutil.common.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface SysResourceService {

    public SysResource getById(Long resId) throws Exception;

    /**
     * 查询所有资源菜单
     *
     * @return
     * @throws Exception
     */
    public List<PerOrResourceResultVO> queryAllResource() throws Exception;

    public Integer getCountByMap(Map<String, Object> param) throws Exception;

    public Integer save(SysResource sysResource) throws Exception;

    public Integer modify(SysResource sysResource) throws Exception;

    public Integer removeById(Long resId) throws Exception;

    public Page<List<SysResource>> queryPageByMap(Map<String, Object> param, Integer pageNo, Integer pageSize) throws Exception;

    //查询树形菜单
    List<SysResource> queryTree(Map<String, Object> param);

    /**
     * 根据父级ID查找下面的所有子级ID
     * @param parentId
     * @return
     */
    List<Long> queryResId(Long parentId);

    public List<SysResourceVO> getAllByRoleId(@Param("roleId") Long roleId);
}
